/**
 * SearchAction.java
 *2014年5月21日下午9:10:10
 *LINKT
 */
package com.bh.action;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

/**
 * @author LINKT
 *
 */
@SuppressWarnings("serial")
public class SearchAction extends BaseAction {

        private String searchitem;
        private int currpage;
        
        public void search() {
                if (currpage<1) {
                        currpage=1;
                }
                JSONObject jo=new JSONObject();
                jo.put("currpage", currpage);
                jo.put("totalpage", 200);
                jo.put("totaldata",4000);
                jo.put("pagesize", 20);
                JSONArray ja=new JSONArray();
                JSONObject jo1=null;
                for (int i = 0; i < 20 ; i++) {
                        if (jo1==null) {
                                jo1=new JSONObject();
                        }
                        jo1.put("fpdm", "123456789012");
                        jo1.put("fphm", "12345678");
                        jo1.put("khbh", "1234567890");
                        jo1.put("skdw", "中国联合通讯网络有限公司河北河北有司石家庄市分公司");
                        jo1.put("kprq", "2014-01-12");
                        jo1.put("je", "123456.00");
                        ja.add(jo1);
                        jo1=null;
                }
                jo.put("data", ja);
                this.out(jo.toString());
                                
        }

        public String getSearchitem() {
                return searchitem;
        }

        public void setSearchitem(String searchitem) {
                this.searchitem = searchitem;
        }

        public int getCurrpage() {
                return currpage;
        }

        public void setCurrpage(int currpage) {
                this.currpage = currpage;
        }
}
